<template>
  <div class="container">

    <!-- 1.0 国内机票 开始 -->
    <div class="air">
      <div class="air_title">
        <i class="iconfont iconfeiji"></i>
        <span>国内机票</span>
      </div>
      <div class="air_content">
        <!-- 360 620 -->
        <div class="air_content_form">
          <AirSearchForm></AirSearchForm>
        </div>
        <div class="air_content_img_wrap">
          <img
            src="http://157.122.54.189:9093/images/pic_sale.jpeg"
            alt=""
          >
        </div>
      </div>
    </div>
    <!-- 1.0 国内机票 结束 -->

    <!-- 2.0 航协认证 开始 -->
    <!-- 2.0 航协认证 结束 -->

    <!-- 3.0 特价机票 开始 -->
    <div class="ticket">
      <div class="ticket_title">
        <i class="iconfont icontejiajipiao"></i>
        <span>特价机票</span>
      </div>
      <div class="ticket_content">
        <div
          class="ticket_item"
          v-for="(item,index) in ticketList"
          :key="index"
        >
          <img
            src='https://imgsrc.baidu.com/baike/pic/item/a71ea8d3fd1f41340d8f3dec281f95cad0c85ee3.jpg'
            alt=""
          >
          <div class="ticket_item_city">
            <span>{{item.departCity}}-{{item.destCity}}</span>
            <span>￥{{item.price}}</span>
          </div>
        </div>
      </div>
    </div>
    <!-- 3.0 特价机票 结束 -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      ticketList: []
    };
  },
  mounted() {
    this.$axios.get("/airs/sale").then(res => {
      this.ticketList = res.data.data;
      console.log(this.ticketList);
    });
  }
};
</script>

<style lang="less" scoped >
.container {
  width: 1000px;
  margin: 0 auto;
}

.air {
  .air_title {
    color: #ffa500;
    font-size: 22px;
    height: 60px;
    display: flex;
    align-items: center;
    i {
      font-size: 22px;
    }
    span {
      margin-left: 5px;
    }
  }
  .air_content {
    display: flex;
    justify-content: space-between;
    .air_content_form {
      width: 360px;
    }
    .air_content_img_wrap {
      width: 620px;
    }
  }
}

.ticket {
  .ticket_title {
    height: 55px;
    display: flex;
    align-items: center;
    color: #409eff;
    i {
      font-size: 18px;
    }
    span {
      font-size: 20px;
      margin-left: 5px;
    }
  }
  .ticket_content {
    padding: 20px 0;
    display: flex;
    justify-content: space-evenly;
    border: 1px solid #ccc;
    .ticket_item {
    width: 220px;
      position: relative;
      img {
        width: 100%;
        height: 146px;
        background-color: #ccc;
      }
      .ticket_item_city {
        position: absolute;
        left: 0;
        bottom: 0;
        height: 28px;
        width: 100%;
        background-color:#000000a8;
        padding: 0 10px;
        color:#fff;
        font-size: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        span {
        }
      }
    }
  }
}
</style>